var shouye = [

{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20187113.jpg",xing:"http://blz.nos.netease.com/1/duizhan/rank/top-icon.png",hong:"",paiming:"1",nicheng:"普通话补丁",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/CN.png",dengji:"27",shenglu:"83.75%",shengchang:"67",fuchang:"13",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/dynamics/normal/20184092.gif",xing:"http://blz.nos.netease.com/1/duizhan/rank/top-icon.png",hong:"",paiming:"2",nicheng:"死逆",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/CN.png",dengji:"28",shenglu:"69.34%",shengchang:"95",fuchang:"42",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon5.jpg",xing:"http://blz.nos.netease.com/1/duizhan/rank/top-icon.png",paiming:"3",nicheng:"法国暗夜精灵",guoji:"",dengji:"28",shenglu:"67.57%",shengchang:"100",fuchang:"48",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon5.jpg",paiming:"4",nicheng:"咪咕猫",guoji:"",dengji:"28",shenglu:"83.33%",shengchang:"60",fuchang:"12",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/dynamics/normal/20181263.gif",hong:"",paiming:"5",nicheng:"20170625",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/KR.png",dengji:"28",shenglu:"85.71%",shengchang:"54",fuchang:"9",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-66.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/dynamics/normal/1.gif",hong:"",paiming:"6",nicheng:"Chaemiko",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/KR.png",dengji:"29",shenglu:"75.49%",shengchang:"77",fuchang:"25",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-65.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20188291.jpg",hong:"",paiming:"7",nicheng:"草莓Dyu5691964",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/CN.png",dengji:"29",shenglu:"74.07%",shengchang:"100",fuchang:"35",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-72.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/2018612.jpg",hong:"",paiming:"8",nicheng:"Soin",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/KR.png",dengji:"29",shenglu:"86.89%",shengchang:"53",fuchang:"8",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-66.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/unknown.jpg",hong:"",paiming:"9",nicheng:"LuciferLNMS",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/KR.png",dengji:"29",shenglu:"80.82%",shengchang:"59",fuchang:"14",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-72.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20188291.jpg",paiming:"10",nicheng:"uEstc——Enya",guoji:"",dengji:"29",shenglu:"68%",shengchang:"102",fuchang:"48",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"}
]

var kdqlunboDiv = document.querySelector(".kdq-lun-bo");

for (var i = 0; i < shouye.length; i++) {
	var p = document.createElement("p");
	kdqlunboDiv.appendChild(p);

	
	var span = document.createElement("span");
	span.className = "kdq-span";
	span.innerHTML = shouye[i].paiming;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-span1";
	span.innerHTML = shouye[i].nicheng;
	p.appendChild(span);

	var aspan = document.createElement("span");
	aspan.className = "kdq-span2";
	p.appendChild(aspan);

	var img = document.createElement("img");
	img.src = shouye[i].guoji;
	aspan.appendChild(img);


	var span = document.createElement("span");
	span.className = "kdq-span3";
	span.innerHTML = shouye[i].dengji;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-span4";
	span.innerHTML = shouye[i].shenglu;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-span5";
	span.innerHTML = shouye[i].shengchang;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-span6";
	span.innerHTML = shouye[i].fuchang;
	p.appendChild(span);

	var qspan = document.createElement("span");
	qspan.className = "kdq-span7";
	p.appendChild(qspan);

	var img = document.createElement("img");
	img.src = shouye[i].img;
	qspan.appendChild(img);
	

	 

}
	var paihan = [
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon5.jpg",paiming:"1",nicheng:"冰天雪帝",guoji:"",dengji:"30",shenglu:"70%",shengchang:"133",fuchang:"57",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20180918.jpg",paiming:"2",nicheng:"小Moon",guoji:"",dengji:"31",shenglu:"82.8%",shengchang:"77",fuchang:"16",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/61_bbtrw.touxiang2_head2.jpg",paiming:"3",nicheng:"金尊芙蓉",guoji:"",dengji:"31",shenglu:"80%",shengchang:"63",fuchang:"14",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-72.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/61_ycrw.touxiang1_head1.jpg",paiming:"4",nicheng:"包子XmTv1733273",guoji:"",dengji:"31",shenglu:"80%",shengchang:"72",fuchang:"18",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/201811701.jpg",paiming:"5",nicheng:"邓剑治",guoji:"",dengji:"31",shenglu:"84.88%",shengchang:"73",fuchang:"13",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon3.jpg",paiming:"6",nicheng:"中国锦鲤。",guoji:"",dengji:"31",shenglu:"78.5%",shengchang:"84",fuchang:"23",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-68.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20188271.jpg",paiming:"7",nicheng:"米拉波雷亚斯",guoji:"http://blz.nos.netease.com/4/duizhan/rank/flag/CN.png",dengji:"31",shenglu:"81.01%",shengchang:"64",fuchang:"15",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-66.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/static_head_picture_12_20170831.jpg",paiming:"8",nicheng:"夢灯籠！",guoji:"",dengji:"32",shenglu:"94.2%",shengchang:"65",fuchang:"4",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-65.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/201809131.jpg",paiming:"9",nicheng:"能说脏话么",guoji:"",dengji:"32",shenglu:"89.83%",shengchang:"53",fuchang:"6",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-65.png"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/info_bindtel_reward.jpg",paiming:"10",nicheng:"闹钟你不闹",guoji:"",dengji:"32",shenglu:"68.86%1",shengchang:"115",fuchang:"52",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/races-65.png"}

]






var dota = [

{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20187113.jpg",paiming:"1",nicheng:"壹个人の精彩",guoji:"",dengji:"传说",shenglu:"88.39%",shengchang:"868",fuchang:"114",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/E01B.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/H06S.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20187111.jpg",paiming:"2",nicheng:"❤zrp890729丶",guoji:"",dengji:"传说",shenglu:"90.2%",shengchang:"451",fuchang:"49",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H06S.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/N01I.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/zhansanguo_ladder_3games.jpg",paiming:"3",nicheng:"都在空城",guoji:"",dengji:"传说",shenglu:"86.46%",shengchang:"498",fuchang:"78",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/Ubal.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/N0EG.jpg",touxiang:"http://blz.nos.netease.com/1/duizhan/rank/races/H00U.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon7.jpg",paiming:"4",nicheng:"丿短丿",guoji:"",dengji:"传说",shenglu:"91.58%",shengchang:"272",fuchang:"25",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H00Q.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/U00F.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/avatar_murky.jpg",paiming:"5",nicheng:"龙大帝",guoji:"",dengji:"传说",shenglu:"90.65%",shengchang:"349",fuchang:"36",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/U00F.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/U00F.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/icon5.jpg",paiming:"6",nicheng:"藤原文太ii",guoji:"",dengji:"传说",shenglu:"85.12%",shengchang:"309",fuchang:"54",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/N01I.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/H00Q.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/dynamics/normal/2017122202.gif",paiming:"7",nicheng:"❤做你的小太阳灬",guoji:"",dengji:"传说",shenglu:"92.31%",shengchang:"252",fuchang:"21",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H00Q.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/N01I.jpg",touxiang:"http://blz.nos.netease.com/1/duizhan/rank/races/Ucrl.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/static_head_picture_18.jpg",paiming:"8",nicheng:"专属丶后期",guoji:"",dengji:"传说",shenglu:"85.97%",shengchang:"239",fuchang:"39",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H00V.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/N01I.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/static/normal/20188291.jpg",paiming:"9",nicheng:"斯蒂芬丶萌神",guoji:"",dengji:"传说",shenglu:"88.2%",shengchang:"329",fuchang:"44",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H071.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/U00F.jpg"},
{img:"http://blz.nos.netease.com/4/dz/res/player/header/dynamics/normal/2017122202.gif",paiming:"10",nicheng:"余笙杨柳风残月丶",guoji:"",dengji:"传说",shenglu:"83.66%",shengchang:"256",fuchang:"50",changyong:"http://blz.nos.netease.com/1/duizhan/rank/races/H00U.jpg",toux:"http://blz.nos.netease.com/1/duizhan/rank/races/H06S.jpg",touxiang:"http://blz.nos.netease.com/1/duizhan/rank/races/N01I.jpg"}



]



var jihe = [
{mingzji:paihan},
{mingzji:dota}
]

var kdqh1Div = document.querySelector(".kdq-h1");

for (var i = 0; i < jihe.length; i++) {
	var lunbouDiv = document.createElement("div");
	lunbouDiv.className = "kdq-lun-bo";
	kdqh1Div.appendChild(lunbouDiv);

	for (var a = 0; a < 10; a++) {
		var p = document.createElement("p");
		p.className = "kdq-p";
		lunbouDiv.appendChild(p);

		var span = document.createElement("span");
		span.className = "kdq-lun-span";
		span.innerHTML = jihe[i].mingzji[a].paiming;
		p.appendChild(span);

		var span = document.createElement("span");
		span.className = "kdq-lun-span1";
		span.innerHTML = jihe[i].mingzji[a].nicheng;
		p.appendChild(span);

		var span1 = document.createElement("span");
		span1.className = "kdq-lun-span2";
		p.appendChild(span1);

		var img = document.createElement("img");
		img.src = jihe[i].mingzji[a].guoji;
		span1.appendChild(img);

		var span2 = document.createElement("span");
		span2.className = "kdq-lun-span3";
		span2.innerHTML = jihe[i].mingzji[a].dengji;
		p.appendChild(span2);

		var span = document.createElement("span");
		span.className = "kdq-lun-span4";
		span.innerHTML = jihe[i].mingzji[a].shenglu;
		p.appendChild(span);

		var span = document.createElement("span");
		span.className = "kdq-lun-span5";
		span.innerHTML = jihe[i].mingzji[a].shengchang;
		p.appendChild(span);

		var span = document.createElement("span");
		span.className = "kdq-lun-span6";
		span.innerHTML = jihe[i].mingzji[a].fuchang;
		p.appendChild(span);

		var span11 = document.createElement("span");
		span11.className = "kdq-lun-span7";
		p.appendChild(span11);

		var img = document.createElement("img");
		img.src = jihe[i].mingzji[a].changyong;
		span11.appendChild(img);

		// var img = document.createElement("img");
		// img.src = jihe[i].mingzji[a].toux;
		// span11.appendChild(img);

		// var img = document.createElement("img");
		// img.src = jihe[i].mingzji[a].touxiang;
		// span11.appendChild(img);



	}
	// var img = document.createElement("img");
	// 	img.src = jihe[i].mingzji[a].touxiang;
	// 	span11.appendChild(img);

}









var kdqlunboDivs = document.querySelectorAll(".kdq-lun-bo");

var spans = document.querySelectorAll(".kdq-h3 span");
for (var i = 0; i < spans.length; i++) {
	spans[i].index = i;
	spans[i].onclick = function (e) {
		 for (var i = 0; i < spans.length; i++) {
		 	spans[i].className = "";
		 	kdqlunboDivs[i].className = "kdq-lun-bo";
		 }

		 spans[e.target.index].className = "kdq-anniu";
		 kdqlunboDivs[e.target.index].className = "kdq-lun-bo kdq-lun-bo-a";

	};
}





var jifen = [
{paiming:"排名",nicheng:"选手昵称",pingtai:"平台昵称",guoji:"国籍",zhongzhu:"种族",jifen:"积分"},
{paiming:"1",nicheng:"FoCuS",pingtai:"20170625",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/kr.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-ORC.png",jifen:"41"},
{paiming:"2",nicheng:"RW.Infi",pingtai:"我要攻击之爪",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/cn.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-HUM.png",jifen:"38"},
{paiming:"3",nicheng:"Lyn",pingtai:"成都第一菜包子",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/kr.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-ORC.png",jifen:"38"},
{paiming:"4",nicheng:"Lawliet",pingtai:"Goranism",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/kr.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-NE.png",jifen:"41"},
{paiming:"5",nicheng:"Moon",pingtai:"Alone",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/kr.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-NE.png",jifen:"33"},
{paiming:"6",nicheng:"Lucifer",pingtai:"LuciferLNMS",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/kr.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-UD.png",jifen:"33"},
{paiming:"7",nicheng:"colorful",pingtai:"Headshot！",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/cn.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-NE.png",jifen:"32"},
{paiming:"8",nicheng:"Newbee.eer0",pingtai:"eer0",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/cn.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-UD.png",jifen:"29"},
{paiming:"9",nicheng:"Foggy",pingtai:"雾Foggy",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/ua.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-NE.png",jifen:"28"},
{paiming:"10",nicheng:"GK.Th000",pingtai:"普通话补丁",guoji:"https://heroes.nosdn.127.net/2/cms/app/flag/cn.png",zhongzhu:"http://blz.nos.netease.com/1/duizhan/rank/races/races-HUM.png",jifen:"26"}
]


var kdqpaimingDiv = document.querySelector(".kdq-paiming");
for (var i = 0; i < jifen.length; i++) {
	var p = document.createElement("p");
	kdqpaimingDiv.appendChild(p);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span1";
	span.innerHTML = jifen[i].paiming;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span2";
	span.innerHTML = jifen[i].nicheng;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span3";
	span.innerHTML = jifen[i].pingtai;
	p.appendChild(span);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span4";
	
	p.appendChild(span);

	var img = document.createElement("img");
	img.src = jifen[1,2,3,4,5,6,7,8,9,10].guoji;
	span.appendChild(img);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span5";
	p.appendChild(span);

	var img = document.createElement("img");
	img.src = jifen[1,2,3,4,5,6,7,8,9,10].zhongzhu;
	span.appendChild(img);

	var span = document.createElement("span");
	span.className = "kdq-paiming-span6";
	span.innerHTML = jifen[i].jifen;
	p.appendChild(span);
}

var span = document.querySelector(".kdq-paiming .kdq-paiming-span4");
	
	span.innerHTML = jifen[0].guoji;
	

var span = document.querySelector(".kdq-paiming-span5");
	span.innerHTML = jifen[0].zhongzhu;






















